﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="SharingCenter.Web.Admin.Administrator.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    管理员管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .admrow td
        {
            padding: 3px 5px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2 class="w5">
        管理员管理</h2>
    <div class="fc">
        <div class="left" style="width: 300px;">
            <h3 class="w4">
                <%--<span class="nss ns-config"></span><span class="iconlabel"></span>--%>
                分配管理员权限</h3>
            <asp:Panel runat="server" DefaultButton="btnAssign">
                把
                <asp:DropDownList runat="server">
                    <asp:ListItem Text="一般管理员" Value="SiteAdmin" />
                </asp:DropDownList>
                分配给：
                <div class="ctn1">
                    <asp:TextBox runat="server" AutoCompleteType="None" ID="txtUserName" />
                    <asp:RequiredFieldValidator ErrorMessage="*" ControlToValidate="txtUserName" runat="server"
                        Display="Dynamic" ValidationGroup="admin" />
                    <ajaxctrltool:TextBoxWatermarkExtender runat="server" TargetControlID="txtUserName"
                        WatermarkCssClass="litetext" WatermarkText="用户账号Email" />
                    <ajaxctrltool:AutoCompleteExtender runat="server" TargetControlID="txtUserName" ServiceMethod="GetEmailList"
                        ServicePath="~/Services/Services.asmx" MinimumPrefixLength="2" CompletionSetCount="10"
                        EnableCaching="true" CompletionInterval="500" />
                </div>
                <div>
                    <asp:Button Text="确定" runat="server" ID="btnAssign" ValidationGroup="admin" />
                </div>
            </asp:Panel>
        </div>
        <div style="padding-left: 310px;">
            <h3 class="w4">
                已分配的管理员
            </h3>
            <asp:UpdatePanel runat="server">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnAssign" />
                </Triggers>
                <ContentTemplate>
                    <asp:ListView runat="server" ID="ListView1">
                        <ItemTemplate>
                            <tr class="admrow">
                                <td>
                                    <asp:Label Text='<%#Container.DataItem %>' runat="server" />
                                </td>
                                <td>
                                    <asp:LinkButton Text="移除" runat="server" ID="btnRemove" CommandName="RemoveAdmin"
                                        CommandArgument='<%#Container.DataItem %>' />
                                </td>
                            </tr>
                        </ItemTemplate>
                        <LayoutTemplate>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr runat="server" id="itemPlaceholder" />
                            </table>
                        </LayoutTemplate>
                        <EmptyDataTemplate>
                            <span class="litetext">还没有分配管理员。</span>
                        </EmptyDataTemplate>
                        <ItemSeparatorTemplate>
                            <tr>
                                <td colspan="2">
                                    <div class="hr1">
                                    </div>
                                </td>
                            </tr>
                        </ItemSeparatorTemplate>
                    </asp:ListView>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
</asp:Content>
